package com.zc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zc.dao.IPowerDao;
import com.zc.domain.Item;
import com.zc.service.PowerService;

@Service(value="powerService")
public class PowerServiceImpl implements PowerService{
	@Autowired
	private IPowerDao powerDao;
	
	@Override
	public List<Item> getSubPower() {
		return powerDao.getPower("ftsjsggy_live");
	}
	@Override
	public List<Item> getMainPower() {
		List<Item> powerData=powerDao.getPower("mtsjsggy_live");
		for(Item i:powerData) 
			i.setTimeStamp(i.getTimeStamp().substring(10));
		return powerData;
	}
}
